package com.github.dongglin.smart.spring.boot.plus.common.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class SensitiveWords {
    //数据唯一标识
    private String dataId;
    //敏感词标识 1是，0否
    private Integer sensitiveFlag;
    //建议动作，0：通过，1：嫌疑，2：不通过
    private Integer suggestion;
    //命中标签
    private List<Label> labels;

    private String name;

    @AllArgsConstructor
    @NoArgsConstructor
    @Data
    public static class Label {
        //标签
        private Integer label;
        //标签名称
        private String labelName;
        //命中级别： 0：正常，1：不确定，2：确定
        private Integer level;
        //命中级别名称
        private String levelName;
        //定位敏感信息
        private String subLabels;
    }

    @AllArgsConstructor
    @NoArgsConstructor
    @Data
    public static class SubLabel {
        private String subLabel;
        private SubLabelDetail details;
    }

    @AllArgsConstructor
    @NoArgsConstructor
    @Data
    public static class SubLabelDetail {
        private List<HitInfo> hitInfos;
    }

    @AllArgsConstructor
    @NoArgsConstructor
    @Data
    public static class HitInfo {
        private String positions;
        private String value;
    }
}
